﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model.Enum;

namespace Service.FilesStrategy
{
    /// <summary>
    /// 工厂类，实例化对象
    /// </summary>
    public  class FileFactory
    {
        public static Strategy CreateStrategy(UploadMode mode)
        {
            switch (mode) {
                case UploadMode.Qiniu:
                    return new QiNiuStragety();
                case UploadMode.Local:
                    return new LocalStragety();
                default:
                    return new QiNiuStragety();
            }
        }
    }
}
